package com.dpj.seckill.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dpj.seckill.mapper.GoodsMapper;
import com.dpj.seckill.pojo.Goods;
import com.dpj.seckill.pojo.GoodsVo;
import com.dpj.seckill.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author testjava
 * @since 2022-07-05
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {



    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<GoodsVo> findGoodsVo() {
        return goodsMapper.findGoodsVo();
    }

    @Override
    public GoodsVo findGoodById(Long id) {


        GoodsVo goodVo= goodsMapper.findGoodById(id);
        System.out.println(goodVo);
         return goodVo  ;
    }

    @Override
    public GoodsVo findGoodsById(Long id) {

      GoodsVo goodsVo= goodsMapper.findGoodsById(id);

        return goodsVo;
    }

    @Override
    public GoodsVo findGoodsVoByGoodsId(Long goodId) {

        return goodsMapper.findGoodsVoByGoodsId( goodId);
    }
}
